GraphLinksModelNodeData

StockSharp.Xaml.Diagram.GXDiagram.Model

A simple representation of node data for GraphLinksModel that supports property change notification, copying, and undo via the INotifyPropertyChanged, ICloneable, and IChangeDataValue interfaces.

Implements: INotifyPropertyChanged, IChangeDataValue, ICloneable

Constructors

GraphLinksModelNodeData()

The default constructor produces an empty object.

GraphLinksModelNodeData(T)

This constructor also initializes the Key property.

key

Properties

Category : string

Gets or sets a String that names the category to which the node data belongs.

IsLinkLabel : bool

Gets or sets whether this node data represents a "label" on a link instead of a simple node.

IsSubGraph : bool

Gets or sets whether this node data represents a group or "subgraph" instead of a normal "atomic" node.

IsSubGraphExpanded : bool

Gets or sets whether this node is in the "expanded" state.

Key : T

Gets or sets the key property for this node data.

Location : Point

Gets or sets a Point that is the location of the node in model coordinates.

MemberKeys : IList<T>

Gets or sets a list of references to member nodes.

SubGraphKey : T

Gets or sets a reference to the containing subgraph node, if any.

Text : string

Gets or sets a String that is associated with the node.

WasSubGraphExpanded : bool

Gets or sets whether this node had been "expanded" when its containing group was "collapsed".

Methods

ChangeDataValue(ModelChangedEventArgs, bool)

This method implements the IChangeDataValue interface, used to perform state changes for undo and redo.

e
an edit describing the change to be performed
undo
true if undoing; false if redoing
Clone() : object

Create a copy of this data; this implements the ICloneable interface.

ConvertNodeKeyToString(T) : string

Convert a key value to a string.

key

Returns: a String from which String) can recover the original key value

ConvertStringToNodeKey(string) : T

Convert a string to a key value.

s

Returns: a

LoadFromXElement(XElement)

Initialize this node data with data held in a Linq for XML XElement.

e
the XElement
MakeXElement(XName) : XElement

Constructs a Linq for XML XElement holding the data of this node.

n
the name of the new XElement

Returns: an initialized XElement

OnPropertyChanged(ModelChangedEventArgs)

Raise the PropertyChanged event.

e
RaisePropertyChanged(string, object, object)

Call this method from property setters to raise the PropertyChanged event.

pname
the property name
oldval
the value before the property was set
newval
the new value
ToString() : string

For debugging, use the Key property as this object's default text rendering.

Events

PropertyChanged : PropertyChangedEventHandler

This event implements the INotifyPropertyChanged interface, so that both the model and the dependency object system can be informed of changes to property values.